package com.itgungnir.diyshuo.fragment.fenlei_items_fragment;

import android.support.v4.app.FragmentActivity;
import android.widget.GridView;
import android.widget.TextView;

/**
 * 管理分类页面两个Fragment中内容的统一管理类
 */
public class FenleiItemContract {
    interface View {
        // 初始化TextView中的文本
        void setTextToTextView(String text);

        // 初始化GridView中的文本
        void setContentToGridView(int[] images, String[] titles);

        // 当点击GridView中某一项时回调的方法
        void onGridViewItemClickListener(int position);
    }

    interface Model {
        void setTextToTextView(TextView tv, String text);

        void setContentToGridView(FragmentActivity activity, GridView gv, int[] images, String[] titles);

        void onGridViewItemClickListener(FragmentActivity activity, int position, String title, boolean isAdd);
    }

    interface Presenter {
        void setTextToTextView(TextView tv, String text);

        void setContentToGridView(FragmentActivity activity, GridView gv, int[] images, String[] titles);

        void onGridViewItemClickListener(FragmentActivity activity, int position, String title, boolean isAdd);
    }
}